<script setup lang="ts">
const btnText = "这是一个小小按钮"
const btnClick = () => {
  console.log("点击按钮")
}

const divMouseEnter = () => {
  console.log("鼠标进入div")
}
const divMouseLeave = () => {
  console.log("鼠标离开div")
}
</script>
<template>
  <button @click="btnClick">{{ btnText }}</button>
  <div class="box" @mouseenter="divMouseEnter()" @mouseleave="divMouseLeave()"></div>
</template>
<style scoped>
.box {
  width: 20%;
  height: 20vw;
  background-color: pink;
}
</style>